package com.example.everying.model.vo.content;

import com.baomidou.mybatisplus.annotation.TableField;
import com.example.everying.model.entity.content.ActivityArticle;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.List;


@Data
@ApiModel(description = "发表内容")
public class ActivityArticleVo extends ActivityArticle {
    private static final long serialVersionUID = 1L;
    /**
     * 用户名
     */
    @TableField(value = "user_name")
    private String userName;

    private String applyUserId;
    /**
     * 头像地址
     */
    @TableField(value = "avatar_url")
    private String avatarUrl;
    /**
     * 信用值
     */
    @TableField(value = "credit_value")
    private String creditValue;
    /**
     * 标签
     */
    @TableField(value = "label")
    private List label;
    /**
     * 位置
     */
    @TableField(value = "location")
    private String location;
    /**
     * 订单状态：1：已接单；2未接单；3：已完成；4：已退出；
     */
    @TableField(value = "orders_status")
    private String ordersStatus;
    /**
     * 申请id
     */
    @TableField(value = "id")
    private String appId;

    @TableField(value = "status")
    private String applyStatus;
    /**
     * 是否为管理员1：后台管理员；2：普通用户；3：校园管理员
     */
    @TableField(value = "is_administrator")
    private String isAdministrator;

    /**
     * 申请人状态列表
     */
    private List<ActivityApplyVo> applicationList;

    @ApiModelProperty(value = "支付密码")
    private String payPassword;

    @ApiModelProperty(value = "申诉人id")
    private String appealUserId;

    @ApiModelProperty(value = "被申诉人id")
    private String beAppealUserId;

    @ApiModelProperty(value = "撤销判断")
    private String revoke;

    @ApiModelProperty(value = "任务时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime taskDate;

    @ApiModelProperty(value = "抵扣积分")
    private Integer points;

    @ApiModelProperty(value = "是否为公共帖子")
    private boolean isPublic =false;

    public void setIsPublic(boolean isPublic) {
        this.isPublic = isPublic;
    }
}
